package com.zhangck.webService;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import cn.itcast.crm.domain.Customer;



/** 
* @author 上午茶
* @version 创建时间：2018年6月2日 下午12:16:29 
* 类说明 
*/
public interface CustomerService {
	
	//查询未关联的客户
	@GET
	@Path("/noassocitedCustomer")
	@Produces({ "application/xml", "application/json" })
	public List<Customer> findNoassociatedCustomer();
	
	//查询关联到定区的客户
	@GET
	@Path("/associatedFixedAreaCustomer/{fixedArea}")
	@Produces({ "application/xml", "application/json" })	public List<Customer> findAssociatedFixedAreaCustomer(
			@PathParam("fixedArea")String fixedAreaid);
	
	//将客户关联到定区上
	@PUT
	
	@Path("/associatedFixedAreaToCustomer")
	public void associatedFixedAreaToCustomer(
			@QueryParam("customerStr")String customerStr,
			@QueryParam("nocustomerIds")String nocustomerIds,
			@QueryParam("fixedAreaid")String fixedAreaid
			);
	
	//查询关联到定区的客户
		@POST
		@Path("/CustomerSave")
		@Consumes({ "application/xml", "application/json" })
		@Produces({ "application/xml", "application/json" })
		public void CustomerSave(Customer customer);
		
		@Path("/CustomerEmail/getCutomer/{telephone}")
		@Consumes({ "application/xml", "application/json" })
		@GET
		public Customer getCutomer(
				@PathParam("telephone")String telephone);
		
		@Path("/CustomerEmail/UpdateCutomer/{telephone}")
		@Consumes({ "application/xml", "application/json" })
		@GET
		public void UpdateCutomer(
				@PathParam("telephone")String telephone);
		
		@Path("/Customer/loginCutomer")
		@Consumes({ "application/xml", "application/json" })
		@Produces({ "application/xml", "application/json" })
		@GET
		public Customer loginCutomer(
				@QueryParam("telephone")String telephone,
				@QueryParam("password")String password);
		

		@Path("/Customer/getFixeArea")
		@Consumes({ "application/xml", "application/json" })
		@Produces({ "application/xml", "application/json" })
		@GET
		public String getFixeArea(
				@QueryParam("address")String address);
		
		
}
